#include<iostream>
using namespace std;
int main(){
  int s,v,t,h,m;
  cin>>s>>v;
  t=s/v+10;
  if(s%v!=0)t++;
  h=t/60;
  m=t%60;
  h=(8+24-h)%24;
  m=(60-m)%60;
  if(m){
    h=(h+24-1)%24;
  }
  printf("%02d:%02d",h,m);
}